﻿using In66.Net.Share.Rpc;
using In66.Net.Share.Rpc.Rest.Services;

namespace Maint.Api
{
    public class AppWebApiDependencyRegistrar : AbstractWebApiDependencyRegistrar
    {
        public AppWebApiDependencyRegistrar(IServiceCollection services)
            : base(services)
        {
        }

        public AppWebApiDependencyRegistrar(IApplicationBuilder app)
            : base(app)
        {
        }

        public override void AddCoreWebApi()
        {
            AddWebApiDefault();
        }

        public override void AddCoreApplication()
        {
            //default
            AddApplicaitonDefault();

            ////cap
            //AddCapEventBus<CapEventSubscriber>();
            //rpc-restclient
            //var restPolicies = this.GenerateDefaultRefitPolicies();
            //AddRestClient<IAuthRestClient>(RpcConsts.Usr, restPolicies);
        }

        public override void UseCore()
        {
            UseWebApiDefault(endpointRoute: endpoint =>
            {
            });
        }
    }
}
